<?php

class Helper_Alias
{

    public function getAliases($path)
    {
        $arr = explode('/', trim($path, '/'));

        if (empty($arr))
        {
            return array();
        }

        $table = Agis::getTable('core@alias');

        $db = $table -> getAdapter();

        $alias = implode(',', array_unique(array_map(array(
            $db,
            'quote'
        ), $arr)));

        $select = $table -> select() -> from($table -> info('name'), array(
            'uid',
            'alias'
        ));

        return $db -> fetchPairs($select);

    }

   

}
